package com.mxchen.lottery.infr.gatewayimpl.activity;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mxchen.lottery.domain.strategy.StrategyGateway;
import com.mxchen.lottery.domain.strategy.model.AwardDetails;
import com.mxchen.lottery.domain.strategy.model.StrategyDetails;
import com.mxchen.lottery.infr.gatewayimpl.activity.mapper.AwardMapper;
import com.mxchen.lottery.infr.gatewayimpl.activity.mapper.StrategyDetailMapper;
import com.mxchen.lottery.infr.gatewayimpl.activity.mapper.StrategyMapper;
import com.mxchen.lottery.infr.gatewayimpl.activity.model.Strategy;
import com.mxchen.lottery.infr.gatewayimpl.activity.model.StrategyDetail;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author hmxchen
 */
@Service
public class StrategyGatewayImpl implements StrategyGateway {
    @Resource
    private StrategyDetailMapper strategyDetailMapper;
    @Resource
    private StrategyMapper strategyMapper;
    @Resource
    private AwardMapper awardMapper;

    @Override
    public StrategyDetails queryStrategyRich(Long strategyId) {
        Strategy strategy = strategyMapper.selectOne(new LambdaQueryWrapper<Strategy>() {{
            eq(Strategy::getStrategyId, strategyId);
        }});

        return null;
    }

    @Override
    public AwardDetails queryAwardInfo(String awardId) {
        return null;
    }

    @Override
    public List<String> queryNoStockStrategyAwardList(Long strategyId) {
        return null;
    }

    @Override
    public boolean deductStock(Long strategyId, String awardId) {
        return false;
    }
}
